package com.totem.customer.api;

import com.totem.base.model.PageVO;
import com.totem.base.model.Result;
import com.totem.customer.vo.*;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

public interface ITCustomerServiceApi {
    @PostMapping("/customer/create")
    @ResponseBody
    Result<Boolean> create(@RequestBody CustomerCreateVO vo);
    @PostMapping("/customer/update")
    Result<Boolean> update(@RequestBody CustomerUpdateVO vo);
    @PostMapping("/customer/delete")
    Result<Boolean> delete(@RequestBody CustomerDelVO vo);
    @GetMapping("/customer/page")
    Result<PageVO<CustomerVO>> page(CustomerPageVO vo);
    @GetMapping("/customer/getById")
    Result<CustomerVO> getById(@RequestParam(value="id") Long id);
    @PostMapping("/customer/login")
    Result<CustomerLoginVO> login(@RequestBody @Valid CustomerLoginVO vo);
    @PostMapping("/customer/logout")
    Result<Boolean> logout();
}
